package com.swc.consumer.client;

import com.swc.consumer.config.FeignConfig;
import com.swc.consumer.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author songwc
 * @date 2020/5/31 15:17
 */
@FeignClient(value = "user-service",fallback = UserClientFallback.class, configuration = FeignConfig.class)
public interface UserClient {

    @GetMapping("/user/{id}")
    User queryUserById(@PathVariable("id") Long id);
}
